package com.donleo.stmg.entity.mapper;

import com.donleo.stmg.entity.model.Team;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.donleo.stmg.entity.model.User;
import com.donleo.stmg.entity.vo.TeamVo;

import java.util.List;

/**
 * <p>
 * 小组表 Mapper 接口
 * </p>
 *
 * @author liangd
 * @since 2020-12-21
 */
public interface TeamMapper extends BaseMapper<Team> {

    List<Team> findAll(TeamVo teamVo);

    long getCount(TeamVo teamVo);

    /**
     * 统计小组人数
     *
     * @param code
     * @return
     */
    Integer getTeamMumberCount(String code);

    /**
     * 移除组长
     *
     * @param teamCode
     */
    int updateTeamLeaderByCode(String teamCode);
}
